<?php

Route::group(['prefix' => 'user', 'namespace' => 'User'], function(){
    Route::post('login', 'IndexController@login');
    Route::get('test', 'IndexController@test')->middleware(['web.check_token']);
    Route::post('reset-pwd', 'IndexController@resetPassword');
    Route::post('add', 'IndexController@register');
    Route::post('login-code', 'IndexController@codeLogin');
    Route::post('signOut', 'IndexController@signOut');
    //需要登陆
    Route::group(['middleware' => ['web.check_token']], function(){
        Route::get('set-type', 'IndexController@userSetType');//设置账号主体类型：1个人用户；2公司；3工厂；4企业类型（有公司有工厂有外发，同时具备2，3的资质）;0未确认主体
    });
    
    //主体信息提交，中间件我另外建了一个WebTestUidMiddle.php,也可以当成学习用，zwp
    Route::group(['middleware' => ['web.test_uid']], function(){
        Route::get('set-typetest', 'IndexController@userSetType');//设置账号主体类型：1个人用户；2公司；3工厂；4企业类型（有公司有工厂有外发，同时具备2，3的资质）;0未确认主体
    });//这个路由提供主体信息设置，zwp
    
});

//个人用户信息录入
Route::group(['prefix' => 'personal', 'namespace' => 'User', 'middleware' => ['web.check_token', 'web.check_user_type:1']], function(){
    Route::post('set-type', 'PersonalController@setStaffType');//个人用户设置员工类型接口
});

/*
Route::group(['prefix' => 'personal', 'namespace' => 'User', 'middleware' => ['web.test_check_token']], function(){
    Route::post('set-type', 'PersonalController@setStaffType');//个人用户设置员工类型接口
});
*/
Route::group(['prefix' => 'personal', 'namespace' => 'User', 'middleware' => ['web.test_check_token']], function(){
    
    Route::post('setJob', 'PersonalController@setJob');//个人用户设置职位
    Route::post('baseInfo', 'PersonalController@baseInfo');//编辑个人基本信息
    Route::get('getBaseInfo', 'PersonalController@getBaseInfo');//获取个人基本信息

    Route::get("getExtendInfo", "PersonalController@getExtendInfo");//获取个人扩展信息
    Route::get("jobWill", "PersonalController@jobWill");//求职意向
    Route::post("certification","PersonalController@certification");//员工认证
    Route::get("getEducation","PersonalController@getEducation");//获取教育背景
    Route::post("setEducation","PersonalController@setEducation");//编辑教育背景

    Route::get("getWorkHistory","PersonalController@getWorkHistory");//获取工作经历
    Route::post("setInfo","PersonalController@setInfo");//编辑扩展信息具体项
    Route::get("getFamily","PersonalController@getFamily");//获取家庭信息
    Route::get("getComment","PersonalController@getComment");//获取自我评价
    Route::get("getWillFactory","PersonalController@getWillFactory");//获取工厂人才需求
    Route::get("getWillCompany","PersonalController@getWillCompany");//获取公司人才需求
    Route::get("getCertification","PersonalController@getCertification");//获取员工认证信息

    Route::get("delPic","PersonalController@delPic");//删除员工认证图片
    Route::get("upCertification","PersonalController@upCertification");//上传员工认证图片
    Route::get("saveCertification","PersonalController@saveCertification");//保存员工认证信息
    
    Route::get("getUserPhone","PersonalController@getUserPhone");//获取用户电话号码
    Route::get("staffSendYzm","PersonalController@staffSendYzm");//发送验证码
    Route::get("savePassword","PersonalController@savePassword");//保存用户密码

    Route::get("getAcceptListsCount","PersonalController@getAcceptListsCount");//获取应聘列表总记录数和分页数
    Route::get("getAcceptListsByPage","PersonalController@getAcceptListsByPage");//获取对应页列表，
    Route::get("acceptInfo","PersonalController@acceptInfo");//应聘详情
});